import request from '@/utils/request';
export async function queryAccount() {
  return request('/api/account');
}

export async function createAccount(params) {
  return request('/api/account', {
    method: 'POST',
    data: params,
  });
}

export async function deleteAccount(params) {
  return request('/api/account', {
    method: 'DELETE',
    data: params,
  });
}

export async function updateAccount(params) {
  return request(`/api/account/${params._id}`, {
    method: 'PUT',
    data: params,
  });
}
// 账户类型
export async function queryAccountType() {
  return request('/api/accountType');
}

export async function createAccountType(params) {
  return request('/api/accountType', {
    method: 'POST',
    data: params,
  });
}
export async function updateAccountType(params) {
  return request(`/api/accountType/${params._id}`, {
    method: 'PUT',
    data: params,
  });
}
export async function deleteAccountType(params) {
  return request('/api/accountType', {
    method: 'DELETE',
    data: params,
  });
}
